package com.pig4cloud.pig.demo.feign;

import com.pig4cloud.pig.demo.dto.Result;
import com.pig4cloud.pig.demo.dto.SmartAppGoodsCategoryDto;
import com.pig4cloud.pig.demo.entity.SmartAppGoodsCategory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("demo-biz")
public interface SmartAppGoodsCategoryFeign {

	@GetMapping("/demo-biz/goodsCategory/getList")
	Result<List<SmartAppGoodsCategoryDto>> getList();

	@GetMapping("/demo-biz/goodsCategory/getById/{id}")
	Result<SmartAppGoodsCategoryDto> getById(@PathVariable("id")Long id);


	@PostMapping("/demo-biz/goodsCategory/add")
	Result add(@RequestBody SmartAppGoodsCategoryDto categoryDto);

	@PutMapping("/demo-biz/goodsCategory/update")
	Result update(@RequestBody SmartAppGoodsCategoryDto categoryDto);

	@DeleteMapping("/demo-biz/goodsCategory/delete/{id}")
	Result delete(@PathVariable("id")Long id);

}
